use Modern::Perl;
use lib './lib';

use File::Slurp;
use Log::Log4perl qw( :easy );
use Try::Tiny;

require AEF::AEFReader;
require AEF::DependencyGrabber;

Log::Log4perl->easy_init($INFO);

my $file = shift;
if(!$file)
{
	print "Usage $0 file.AEF\n";
	exit 1;
}

my $data = read_file($file, binmode => ':raw');
my $processor = AEF::DependencyGrabber->new();
my $aef = AEF::AEFReader->new(processor => $processor);
$aef->ReadAEF($data);
print $processor->AppName, " depends on,\n";
map { print $_, "\n" } @{$processor->Libraries};

